import {createApp} from 'vue'
import './style.css'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import {vueRouter} from './assets/ts/my-vue-router'
import 'element-plus/theme-chalk/dark/css-vars.css'
import VMdEditor from '@kangc/v-md-editor';
import VMdPreview from '@kangc/v-md-editor/lib/preview';
import '@kangc/v-md-editor/lib/style/base-editor.css';
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
import '@kangc/v-md-editor/lib/theme/style/vuepress.css';
import Prism from 'prismjs';
import {createPinia} from 'pinia'
import piniaPersist from 'pinia-plugin-persist'

const app = createApp(App)
// 第三方插件
app.use(ElementPlus)
app.use(vueRouter)
// v-md-editor的编辑组件
VMdEditor.use(vuepressTheme, {
    Prism,
});
app.use(VMdEditor)
// v-md-editor的预览组件
VMdPreview.use(vuepressTheme, {
    Prism,
});
app.use(VMdPreview)
// pinia
const pinia = createPinia()
pinia.use(piniaPersist)
app.use(pinia)
// 单文件挂载
app.mount('#app')